MsgN("\n----------------------------------------")
MsgN("-- MadDog's Base Loading")

CreateConVar( "maddogs_base", "0", FCVAR_NOTIFY )

--holds the entire Base for other addons
MD = {}

MD.IsEnabled = function()
	return (tonumber(GetConVarNumber("maddogs_base")) == 1)
end

--include the shared files
for _, file in pairs(file.FindInLua("maddogs_base/shared/*.lua")) do
	MsgN("-- " .. file .. " loaded.")
	IncludeClientFile( "maddogs_base/shared/" .. file )

	if SERVER then include( "maddogs_base/shared/" .. file ) end
end

if (SERVER) then
	--include this file
	AddCSLuaFile("autorun/maddogs_base.lua")

	--get all server side files
	for _, file in pairs(file.FindInLua("maddogs_base/server/*.lua")) do
		MsgN("-- " .. file .. " loaded.")
		include( "maddogs_base/server/" .. file )
	end
end

--load all client files
for _, file in pairs(file.FindInLua("maddogs_base/client/*.lua")) do
	MsgN("-- " .. file .. " loaded.")
	IncludeClientFile( "maddogs_base/client/" .. file )
end



MsgN("-- Done.")
MsgN("----------------------------------------\n")